<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        <div class="layui-form-item">
            <label class="layui-form-label">租赁名称</label>
            <div class="layui-input-block">
                <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入租赁名称" value="{$row.title}">
            </div>
        </div>
        <div class="layui-form-item">
                    <label class="layui-form-label ">缩略图</label>
                    <div class="layui-input-block layuimini-upload">
                        <input name="thumb" class="layui-input layui-col-xs6"  placeholder="请上传缩略图" value="{$row.thumb}">
                        <div class="layuimini-upload-btn">
                            <span><a class="layui-btn layui-btn-sm" data-upload="thumb" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                          <!--   <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_cover_picture" data-upload-select="thumb" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span> -->
                        </div>
                    </div>
            </div>
             <div class="layui-form-item">
                    <label class="layui-form-label ">主图</label>
                    <div class="layui-input-block layuimini-upload">
                        <input name="main_image" class="layui-input layui-col-xs6"  placeholder="请上传主图" value="{$row.main_image}">
                        <div class="layuimini-upload-btn">
                            <span><a class="layui-btn layui-btn-sm" data-upload="main_image" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                          <!--   <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_cover_picture" data-upload-select="thumb" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span> -->
                        </div>
                    </div>
            </div>
             <div class="layui-form-item">
                    <label class="layui-form-label ">详情图</label>
                    <div class="layui-input-block layuimini-upload">
                        <input name="detail_image" class="layui-input layui-col-xs6"  placeholder="请上传详情图" value="{$row.detail_image}">
                        <div class="layuimini-upload-btn">
                            <span><a class="layui-btn layui-btn-sm" data-upload="detail_image" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                          <!--   <span><a class="layui-btn layui-btn-normal layui-btn-sm" id="select_cover_picture" data-upload-select="thumb" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span> -->
                        </div>
                    </div>
            </div>
                <div class="layui-form-item">
            <label class="layui-form-label">周末是否显示半天租</label>
            <div class="layui-input-block">
              <input type="radio" name="week_state"  value="1" title="显示" {if $row.week_state==1}checked{/if}>
              <input type="radio" name="week_state"  value="0" title="不显示" {if $row.week_state==0}checked{/if}>
            </div>
         </div>
         <div class="layui-form-item">
                <label class="layui-form-label">单位</label>
                <div class="layui-input-inline">
                    <input type="unit" name="deposit" class="layui-input" lay-verify="required" placeholder="请输入单位" value="{$row.unit}">
                </div>
            </div>
        <div class="layui-form-item">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-block">
                {if $row.spec_type=='one'}
                    <input type="radio"lay-filter="spec_type" name="spec_type" value="one" title="单规格" checked>
                    <input type="radio" lay-filter="spec_type" name="spec_type" value="more" title="多规格" disabled>
                {else/}
                    <input type="radio" lay-filter="spec_type" name="spec_type" value="one" title="单规格"  disabled>
                    <input type="radio" lay-filter="spec_type" name="spec_type" value="more" title="多规格" checked>
                {/if}
            </div>
         </div>
          <div class="layui-form-item one {if $row.spec_type=='more'} layui-hide{/if}" id="layui-one">
                    
            <div class="layui-form-item">
                <label class="layui-form-label">原价</label>
                <div class="layui-input-inline">
                    <input type="number" name="price" class="layui-input" lay-verify="required" placeholder="请输入原价" value="{$row.price}">
                </div>
                
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">活动价</label>
                <div class="layui-input-inline">
                    <input type="number" name="activity_price" class="layui-input" lay-verify="required" placeholder="请输入活动价" value="{$row.activity_price}">
                </div>
            </div>
               <div class="layui-form-item">
                <label class="layui-form-label">押金</label>
                <div class="layui-input-inline">
                    <input type="number" name="deposit" class="layui-input" lay-verify="required" placeholder="请输入押金" value="{$row.deposit}">
                </div>
            </div>
        </div>
         <input type="hidden" name="id" value="{$row.id}">
        <div class="more {if $row.spec_type=='one'} layui-hide{/if}" id="layui-more">
                     
                      {include file="../app/admin/view/management/lease/spec_edit.html" /}
        </div>
        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm submit" data-url="edit">提交</button>
            <!-- <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button> -->
            <!-- <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button> -->
        </div>

    </form>
</div>
<script type="text/javascript">
 layui.use(['form', 'layer', 'jquery' ], function () {
        $ = layui.jquery;
        var layer = layui.layer,
            form = layui.form;
      form.on('radio(spec_type)', function (data) {

        　　if(data.value=='one'){
                $("#layui-more").addClass('layui-hide');
                $("#layui-one").removeClass('layui-hide');
            }else{
                $("#layui-more").removeClass('layui-hide');
                $("#layui-one").addClass('layui-hide');
            }
          
        });
    });  
</script>

